package com.ruoyi.system.controller;

import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.domain.Test;
import com.ruoyi.system.service.ITestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("test")
public class TestController extends BaseController {
    @Autowired
    private ITestService testService;

    @GetMapping("list")
    public TableDataInfo list(Test test){
        startPage();
        List<Test> tests = testService.queryTests();
        return getDataTable(tests);
    }
}
